package com.yixueyun.learning.service;

import com.yixueyun.base.model.PageResult;
import com.yixueyun.learning.model.dto.MyCourseTableParams;
import com.yixueyun.learning.model.dto.YxyChooseCourseDto;
import com.yixueyun.learning.model.dto.YxyCourseTablesDto;
import com.yixueyun.learning.model.po.YxyCourseTables;

/**
 * 选课相关接口
 */
public interface MyCourseTablesService {
    /**
     * @description 添加选课
     * @param userId 用户id
     * @param courseId 课程id
     * @return com.yixueyun.learning.model.dto.YxyChooseCourseDto
     * @author kklmars
     * @date 2023/10/24 17:33
     */
    YxyChooseCourseDto addChooseCourse(String userId, Long courseId);
    /**
     * @description 判断学习资格
     * @param userId
     * @param courseId
     * @return YxyCourseTablesDto 学习资格状态 [{"code":"702001","desc":"正常学习"},{"code":"702002","desc":"没有选课或选课后没有支付"},{"code":"702003","desc":"已过期需要申请续期或重新支付"}]
     * @author kklmars
     * @date 2023/10/3 7:37
     */
    YxyCourseTablesDto getLearningStatus(String userId, Long courseId);

    /**
     * 保存选课成功
     * @param chooseCourseId
     * @return
     */
    boolean saveChooseCourseSuccess(String chooseCourseId);
    /**
     * @description 我的课程表
     * @param params
     * @return com.yixueyun.base.model.PageResult<com.yixueyun.learning.model.po.YxyCourseTables>
     * @author kklmars
     * @date 2023/10/27 9:24
     */
    PageResult<YxyCourseTables> mycourestabls(MyCourseTableParams params);
}
